/*
Navicat MySQL Data Transfer

Source Server         : MYsql
Source Server Version : 50716
Source Host           : localhost:3306
Source Database       : tp_role_system

Target Server Type    : MYSQL
Target Server Version : 50716
File Encoding         : 65001

Date: 2017-12-21 14:25:34
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for think_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group`;
CREATE TABLE `think_auth_group` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`title`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`status`  tinyint(1) NOT NULL DEFAULT 1 ,
`rules`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' ,
`beizhu`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='用户组表'
AUTO_INCREMENT=23

;

-- ----------------------------
-- Records of think_auth_group
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group` VALUES ('1', '超级管理员', '1', '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16', '超级管理员不可删除'), ('2', '管理员', '1', '1,2,3,4,5,8', '系统管理员'), ('3', '普通用户', '1', '1,3,4', 'vip用户'), ('5', '普通用户', '1', '1,3,4', '临时用户'), ('4', '普通用户', '1', '1,3,4', '用户'), ('6', '管理员', '1', '1,2,3,4,5,8', '系统管理员');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_group_access`;
CREATE TABLE `think_auth_group_access` (
`uid`  mediumint(8) UNSIGNED NOT NULL COMMENT '用户id' ,
`group_id`  mediumint(8) UNSIGNED NOT NULL COMMENT '用户组id' ,
UNIQUE INDEX `uid_group_id` (`uid`, `group_id`) USING BTREE ,
INDEX `uid` (`uid`) USING BTREE ,
INDEX `group_id` (`group_id`) USING BTREE 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='用户组明细表'

;

-- ----------------------------
-- Records of think_auth_group_access
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_group_access` VALUES ('1', '1'), ('2', '2'), ('3', '3'), ('4', '3'), ('5', '3'), ('6', '6'), ('7', '4'), ('8', '4'), ('9', '5');
COMMIT;

-- ----------------------------
-- Table structure for think_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `think_auth_rule`;
CREATE TABLE `think_auth_rule` (
`id`  mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则唯一标识' ,
`title`  char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则中文名称' ,
`status`  tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：为1正常，为0禁用' ,
`type`  char(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`condition`  char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则表达式，为空表示存在就验证，不为空表示按照条件验证' ,
`pid`  int(1) NOT NULL ,
`id_menu`  int(1) NOT NULL ,
PRIMARY KEY (`id`),
UNIQUE INDEX `name` (`name`) USING BTREE 
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='规则表'
AUTO_INCREMENT=18

;

-- ----------------------------
-- Records of think_auth_rule
-- ----------------------------
BEGIN;
INSERT INTO `think_auth_rule` VALUES ('1', 'home/user/index', '基本信息', '1', '1', '', '0', '1'), ('2', '', '管理信息', '1', '1', '', '0', '1'), ('3', 'home/user/info', '个人信息', '1', '1', '', '1', '1'), ('4', 'home/user/updatepwd', '修改密码', '1', '1', '', '1', '1'), ('5', 'home/user/items', '用户列表', '1', '1', '', '2', '1'), ('6', 'home/user/role', '角色列表', '1', '1', '', '2', '1'), ('8', 'home/user/serverdb', '用户列表查询数据库', '1', '1', '', '0', '0'), ('9', 'home/user/roledb', '角色列表查询数据库', '1', '1', '', '0', '0'), ('10', 'home/user/authdb', '权限管理', '1', '1', '', '0', '0'), ('11', 'home/user/rolefen', '角色查询数据库', '1', '1', '', '0', '0'), ('7', 'home/user/auth', '权限列表', '1', '1', '', '2', '1'), ('12', 'home/user/addroles', '角色插入数据', '1', '1', '', '0', '0'), ('13', 'home/user/delformrole', '角色删除数据', '1', '1', '', '0', '0'), ('14', 'home/user/authfen', '权限列表查询数据', '1', '1', '', '0', '0'), ('15', 'home/user/delallin', '角色右边表删除数据', '1', '1', '', '0', '0'), ('16', 'home/user/authdel', '权限列表删除权限', '1', '1', '', '0', '0');
COMMIT;

-- ----------------------------
-- Table structure for think_member
-- ----------------------------
DROP TABLE IF EXISTS `think_member`;
CREATE TABLE `think_member` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`username`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`phone`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`password`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`name`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`birthday`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`sex`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`jibie`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=9

;

-- ----------------------------
-- Records of think_member
-- ----------------------------
BEGIN;
INSERT INTO `think_member` VALUES ('1', 'zhangsan', '13959598686', 'c33367701511b4f6020ec61ded352059', '张三王', '2014-11-22', '男', '超级管理员'), ('2', 'lisansi', '14949494949', 'e10adc3949ba59abbe56e057f20f883e', '李四', '2000-09-09', '男', '管理员'), ('3', 'maliuqi', '15964201987', 'e10adc3949ba59abbe56e057f20f883e', '马六', '1998-09-30', '女', '普通用户'), ('4', 'liuqiba', '15656565656', 'e10adc3949ba59abbe56e057f20f883e', '六七', '2000-10-01', '男', '普通用户'), ('5', 'qidian', '18822225823', '3d186804534370c3c817db0563f0e461', '321', '2017-12-01', '男', '普通用户'), ('6', 'xiaoxue', '13659565656', '4297f44b13955235245b2497399d7a93', '小雪', '1995-06-06', '女', '普通用户'), ('7', 'liuyan', '15959595958', '4297f44b13955235245b2497399d7a93', '深深深', '1995-03-03', '男', '普通用户'), ('8', 'yizhizou', '15959595958', 'c33367701511b4f6020ec61ded352059', '啊啊啊啊啊', '1995-03-15', '女', '普通用户');
COMMIT;

-- ----------------------------
-- Auto increment value for think_auth_group
-- ----------------------------
ALTER TABLE `think_auth_group` AUTO_INCREMENT=23;

-- ----------------------------
-- Auto increment value for think_auth_rule
-- ----------------------------
ALTER TABLE `think_auth_rule` AUTO_INCREMENT=18;

-- ----------------------------
-- Auto increment value for think_member
-- ----------------------------
ALTER TABLE `think_member` AUTO_INCREMENT=9;
